package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.SyncUserDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.SHENSI_ADMIN_COLLECT,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface ThirdPartyWeChatClient {

    @PostMapping(value = "/thirdParty/weChat/ticketNotify",  produces = "text/html;charset=UTF-8")
    public String ticketNotify(@RequestParam("request") HttpServletRequest request,
                               @RequestParam("response") HttpServletResponse response);

    @GetMapping("/thirdParty/weChat/bindWxNotify")
    public void bindWxNotify(@RequestParam("auth_code") String authCode,
                             @RequestParam("expires_in") Integer expiresIn,
                             HttpServletResponse resp)throws IOException;


    @GetMapping("/thirdParty/weChat/getQRCode")
    public AjaxResult getQRCode();


    @GetMapping("/thirdParty/weChat/getAccessToken")
    public String  getAccessToken(@RequestParam("authorizerAppid") String authorizerAppid);

    @GetMapping("/thirdParty/weChat/aaaen")
    public void callBack(HttpServletResponse resp)throws IOException;
}
